package m.store.model;

import m.base.model.StoreInfo;
import m.base.model.UserInfo;
import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.type.FieldType;

import java.util.Date;

public abstract class OrderModel extends Model {
    @LinkTableMeta(name="store_oid",table= StoreInfo.class,description="所属商户")
    private StoreInfo store;
    @LinkTableMeta(name="guest_oid",table= GuestInfo.class,description="客户")
    private GuestInfo guest;
    @FieldMeta(name="order_no",type= FieldType.STRING,length = 20,description="单号")
    private String orderNo;
    @LinkTableMeta(name="input_user_oid",table= UserInfo.class,description="录入用户")
    private UserInfo inputUser;
    @FieldMeta(name="input_date",type= FieldType.DATE,description="录入时间")
    private Date inputDate;
    @FieldMeta(name="status",type= FieldType.STRING,defaultValue = "N",description="状态",dictOption = "N:登记中,V:确认中,A:审核中,Y:完成")
    private String status;
    public final static String Status_Register="N";
    public final static String Status_Confirm="V";
    public final static String Status_Check="A";
    public final static String Status_Done="Y";
    @FieldMeta(name="repository_status",type= FieldType.STRING,length=10,description="仓库状态",dictOption = "A:未审核,Y:通过,N:不通过")
    private String repositoryStatus;
    @FieldMeta(name="submit_date",type= FieldType.DATE,description="提交时间")
    private Date submitDate;
    @LinkTableMeta(name="check_user_oid",table= UserInfo.class,description="审核用户")
    private UserInfo checkUser;
    @FieldMeta(name="check_date",type= FieldType.DATE,description="审核时间")
    private Date checkDate;

    public String getRepositoryStatus() {
        return repositoryStatus;
    }

    public void setRepositoryStatus(String repositoryStatus) {
        this.repositoryStatus = repositoryStatus;
    }

    public StoreInfo getStore() {
        return store;
    }

    public void setStore(StoreInfo store) {
        this.store = store;
    }

    public GuestInfo getGuest() {
        return guest;
    }

    public void setGuest(GuestInfo guest) {
        this.guest = guest;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public UserInfo getInputUser() {
        return inputUser;
    }

    public void setInputUser(UserInfo inputUser) {
        this.inputUser = inputUser;
    }

    public Date getInputDate() {
        return inputDate;
    }

    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getSubmitDate() {
        return submitDate;
    }

    public void setSubmitDate(Date submitDate) {
        this.submitDate = submitDate;
    }

    public UserInfo getCheckUser() {
        return checkUser;
    }

    public void setCheckUser(UserInfo checkUser) {
        this.checkUser = checkUser;
    }

    public Date getCheckDate() {
        return checkDate;
    }

    public void setCheckDate(Date checkDate) {
        this.checkDate = checkDate;
    }
}
